Skip to content

fix(coding-agent): recover command failures and preserve session state - #195

Draft
MelodyVAR wants to merge 4 commits into
mainfrom
fix/context-completion-public-20260925
Draft

MelodyVAR wants to merge 4 commits into
mainfrom
fix/context-completion-public-20260925

Conversation

@MelodyVAR

@MelodyVAR MelodyVAR commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Foreground commands can stall a non-interactive session when a child process keeps an output pipe open, and shortened error output can hide the information needed to recover. This adds a 120-second default for Step run_command, cleans up discoverable Linux descendants on timeout or abort, reports signal termination as failure, and preserves a readable full log when command output is shortened.

The change also keeps runtime state from interfering with solution delivery:

  • STEP_CODING_AGENT_PLAN_DIR optionally stores plans outside the workspace. Existing defaults and saved session paths remain authoritative.
  • Compaction preserves prior history and refuses empty replacement summaries. Summary output respects the model limit and the existing 32,000-token ceiling, including when a larger reserve is used to trigger compaction earlier.
  • --completion-check git-committed checks delivery in the same session. Optional --completion-review shares the existing follow-up budget.
  • File-exploration guidance recognizes the active Step aliases search_files, find_files, and list_directory. This removes shell-only fallback instructions when dedicated tools are available, while preserving guidance for actual shell-only profiles.

Explicit command timeouts, background execution, and permission decisions keep their contracts. Linux descendant snapshots cannot atomically contain already-reparented descendants or forks racing the snapshot. This change adds no dependency.

Validation: the preceding runtime implementation passed npm run check and the complete offline ./test.sh suite, including subprocess recovery, full-output reads, plan resume, compaction, and serializer coverage. The appended prompt correction adds builder regressions for each alias and for legacy, mixed, shell-only, and PowerShell profiles: 65 targeted tests and npm run check pass on the updated public tree. Six alias cases were first reproduced as failing on the prior implementation. The lockfile and generated model data are unchanged.

Benchmark results apply to their pinned runtime versions; the appended prompt correction has not been evaluated in a new full benchmark run. This PR makes no causal score-improvement claim. Denial-recovery configuration is tracked separately in #188.

@MelodyVAR MelodyVAR changed the title fix(coding-agent): preserve compaction context and check committed completion fix(coding-agent): recover command failures and preserve session state Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant